package com.example.administrator.xinyutg.fragment;


import android.content.Intent;
import android.os.Bundle;

import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.example.administrator.xinyutg.R;
import com.example.administrator.xinyutg.activity.RegisterActivity;

/**
 * A simple {@link Fragment} subclass.
 */
public class MyFragment extends Fragment implements View.OnClickListener{


    private Button butReg;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View v= inflater.inflate(R.layout.fragment_my, container, false);
        initView(v);

        return v;
    }

    private void initView(View v) {
        butReg = (Button) v.findViewById(R.id.but_my_reg);

        butReg.setOnClickListener(this);
    }


    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.but_my_reg:
                Intent intent=new Intent(getActivity(), RegisterActivity.class);
                startActivity(intent);
                break;
        }
    }
}
